import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    cartCount: 0, // 购物车数量
  },
  mutations: {
    cartAdd(state, n = 1) {
      state.cartCount += n
    },
  },
  actions: {},
  modules: {},
})
